<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        /* 可视区域的宽度和高度 clientWidth clientHeight
         获取滚动区域的宽高  scrollWidth  scrollHeight 
         */
         console.log(document.documentElement.clientWidth)
         console.log(document.documentElement.clientHeight)
    </script>
</body>
</html>